package com.example.htmlutildemo.util;

import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
import sun.net.www.http.HttpClient;

import java.io.IOException;
import java.net.URL;

public class HtmlUtil {
    public static void main(String[] args) {
        String baiDu = new HttpUtil().getBaiDu();
        System.out.println(baiDu);
        Document parse = Jsoup.parse(baiDu);
        Element body = parse.body();
        Element elementById = body.getElementById("kw");
        System.out.println(elementById);
    }


}
